#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
	int arr[9][9] = { 0 };
	int i = 0;
	int j = 0;
	for (i = 0; i < 9; i++)
	{
		for (j = 0; j < i; j++)
		{
			if (j == 0)
				arr[i][j] = 1;
			if (j == i)
				arr[i][j] = 1;
			if (j >= 1 && i >= 2)
				arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
		}
	}

	for (i = 0; i < 9; i++)
	{
		for (j = 0; j < i; j++)
		{
			printf("%d ", arr[i][j]);
		}
		printf("\n");
	}

	return 0;
}